/****************************************************************************
 *
 * Copyright (C) 2003-2008 Los Alamos National Security, LLC
 *                         Packet Analytics Corporation
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License Version 2 as
 * published by the Free Software Foundation.  You may not use, modify or
 * distribute this program under any other version of the GNU General
 * Public License.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 *
 ****************************************************************************/
package nfse;

/*******************************************************************************
 * This class is a data structure for holding information about the status of a
 * node n the system.
 * 
 * @author
 * 
 * This code is the property of Los Alamos National Laboratory and the
 * University of California, Copyright 2005
 */
public class NodeStatus {

    /***************************************************************************
     * The node identifier from the system metadata
     */
    private int id = -1;

    /***************************************************************************
     * Flag indicating whether or not this node is used in build operations
     */
    private boolean build = false;

    /***************************************************************************
     * Flag indicating whether or not this node is used in query operations
     */
    private boolean query = false;

    /***************************************************************************
     * Username for the dynamic databases on this node for each data type
     */
    private String dynamicUser = "";

    /***************************************************************************
     * Password for the dynamic databases on this node for each data type
     */
    private String dynamicPassword = "";

    /***************************************************************************
     * The name of this node
     */
    private String name = "";
    
    private int dataServerPort = NetFSE.DATA_SERVER_PORT;

    public int getDataServerPort() {
        return dataServerPort;
    }

    public void setDataServerPort(int dataServerPort) {
        this.dataServerPort = dataServerPort;
    }

    public String toString() {
        return id + ": " + name + "(" + build + "," + query + ")";
    }

	/**
	 * @param id the id to set
	 */
	public void setID(int id) {
		this.id = id;
	}

	/**
	 * @return the id
	 */
	public int getID() {
		return id;
	}

	/**
	 * @param build the build to set
	 */
	public void setBuild(boolean build) {
		this.build = build;
	}

	/**
	 * @return the build
	 */
	public boolean isBuild() {
		return build;
	}

	/**
	 * @param query the query to set
	 */
	public void setQuery(boolean query) {
		this.query = query;
	}

	/**
	 * @return the query
	 */
	public boolean isQuery() {
		return query;
	}

	/**
	 * @param dynamicUser the dynamicUser to set
	 */
	public void setDynamicUser(String dynamicUser) {
		this.dynamicUser = dynamicUser;
	}

	/**
	 * @return the dynamicUser
	 */
	public String getDynamicUser() {
		return dynamicUser;
	}

	/**
	 * @param dynamicPassword the dynamicPassword to set
	 */
	public void setDynamicPassword(String dynamicPassword) {
		this.dynamicPassword = dynamicPassword;
	}

	/**
	 * @return the dynamicPassword
	 */
	public String getDynamicPassword() {
		return dynamicPassword;
	}

	/**
	 * @param name the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}
}